//
//  LLViewModel.h
//  lrlzapp
//
//  Created by dl on 16/2/22.
//  Copyright © 2016年 lrlz. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LLNavigationControllerStack.h"

typedef NS_ENUM(NSUInteger, LLTitleViewType) {
    LLTitleViewTypeDefault,
    LLTitleViewTypeDoubleTitle,
    LLTitleViewTypeLoadingTitle
};

/**
 *  UIViewController的nav bar的类型
 */
typedef NS_ENUM(NSInteger, LLNavigationBarType) {
    LLNavigationBarTypeNone = 0u << 0,
    LLNavigationBarTypeNomal = 1u << 0,      // 普通类型: 一个返回按钮，一个title
    LLNavigationBarTypeGoodsDetail = 1u << 1,      // 商品详情样式: nav的北京随着滚动动态变化
    LLNavigationBarTypeWebView = 1u << 2,      // WebView样式的: 一个返回按钮(返回按钮在网页中是返回上一级)，一个title
    LLNavigationBarTypeCustom = 1u << 3       // 自定义
};


@interface LLViewModel : NSObject

@property(nonatomic, strong, readonly) LLNavigationControllerStack *navService;

@property(nonatomic, copy, readonly) NSDictionary *params;
@property(nonatomic, assign) LLTitleViewType titleViewType;
@property(nonatomic, copy) NSString *title;
@property(nonatomic, copy) NSString *subtitle;

@property(nonatomic, assign) LLNavigationBarType navBarType;
@property(nonatomic, copy) NSString *segmentedTitle;

@property(nonatomic, assign) BOOL shouldFetchLocalDataOnViewModelInitialize;
@property(nonatomic, assign) BOOL shouldRequestRemoteDataOnViewDidLoad;

@property(nonatomic, strong, readonly) RACSubject *errors;
@property(nonatomic, strong, readonly) RACSubject *willDisappearSignal;

- (instancetype)initWithParams:(NSDictionary *)params;

- (void)initialize;

@end
